﻿@using Mozlite;
@using Mozlite.Common;
@using Mozlite.Common.Configuration
@using Mozlite.Web;
@using Mozlite.FileStorages;
@using Mozlite.Web.Controls;

@helper ShowPager(int pages)
{
    int pageIndex = AppContext.Current.PageIndex;
    <div class="blog-paging">
        @if (pages >= pageIndex + 1)
        {
	    <a class="ui-button button1 button1-next float-right " href="?page=@(pageIndex + 1)">
		    <span>
			    <span>@Resources.GetString("ThreadsView.NextPage")</span>
		    </span>
	    </a>
        }
            
        @if (pageIndex > 1)
        {
        <a class="ui-button button1 button1-previous " href="?page=@pageIndex">
		    <span>
			    <span>@Resources.GetString("ThreadsView.PrevPage")</span>
		    </span>
	    </a>
        }
	    <span class="clear"></span>
	</div>
}

@*
 显示窗体状态信息
*@
@helper ShowDialogStatus(dynamic status)
{
    if(status.__Status != null)
    {
        if (status.__StatusType == true)
        {
        <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> 
		    <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
            @status.__Status
            </p>
	    </div>
        }
        else if (status.__StatusType == false)
        {
        <div class="container">
            <div class="dialog_status">
                @status.__Status
            </div>
            <div class="tcenter">
                <button class="button" onclick="parent.closeModal(); parent.document.location.reload(); return false;">
		            @Resources.GetString("Dialog.Closed")
	            </button>
            </div>
        </div>
        }
    } 
}